<?php /* Smarty version 2.6.18, created on 2016-12-14 20:34:42
         compiled from flink/index.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'flink/index.tpl', 38, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "public/header.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<div id="page-wrapper">
	<div class="row">
        <div class="col-md-6">
            <a href="<?php echo $this->_tpl_vars['app']; ?>
/flink/add" class="btn btn-success">添加链接</a>
        </div>
        <div class="col-md-6">
           
            <div class="form-group input-group">
                <input type="text" class="form-control" name="key" placeholder="输入链接标题或者地址关键词搜索">
                <span class="input-group-btn">
                  <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
                </span>
            </div>
        </div>
    </div>
    <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "public/title.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
    <form  method="post" action="<?php echo $this->_tpl_vars['url']; ?>
/order" >
		<ul class="list-group">
		<table class="table table-hover table-striped">
	        <thead>
	            <tr>
	                <th>网站名称</th>
	                <th>网站LOGO</th>
	                <th>联系人</th>
	                <th>添加时间</th>
	                <th>操作</th>
	            </tr>
	        </thead>
	        <tbody>
	      		 <?php unset($this->_sections['doc']);
$this->_sections['doc']['name'] = 'doc';
$this->_sections['doc']['loop'] = is_array($_loop=$this->_tpl_vars['links']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['doc']['show'] = true;
$this->_sections['doc']['max'] = $this->_sections['doc']['loop'];
$this->_sections['doc']['step'] = 1;
$this->_sections['doc']['start'] = $this->_sections['doc']['step'] > 0 ? 0 : $this->_sections['doc']['loop']-1;
if ($this->_sections['doc']['show']) {
    $this->_sections['doc']['total'] = $this->_sections['doc']['loop'];
    if ($this->_sections['doc']['total'] == 0)
        $this->_sections['doc']['show'] = false;
} else
    $this->_sections['doc']['total'] = 0;
if ($this->_sections['doc']['show']):

            for ($this->_sections['doc']['index'] = $this->_sections['doc']['start'], $this->_sections['doc']['iteration'] = 1;
                 $this->_sections['doc']['iteration'] <= $this->_sections['doc']['total'];
                 $this->_sections['doc']['index'] += $this->_sections['doc']['step'], $this->_sections['doc']['iteration']++):
$this->_sections['doc']['rownum'] = $this->_sections['doc']['iteration'];
$this->_sections['doc']['index_prev'] = $this->_sections['doc']['index'] - $this->_sections['doc']['step'];
$this->_sections['doc']['index_next'] = $this->_sections['doc']['index'] + $this->_sections['doc']['step'];
$this->_sections['doc']['first']      = ($this->_sections['doc']['iteration'] == 1);
$this->_sections['doc']['last']       = ($this->_sections['doc']['iteration'] == $this->_sections['doc']['total']);
?>	
	            <tr>
	                <td><input type="text" name="ord[]" style="width:20px" maxlength="3" value="<?php echo $this->_tpl_vars['links'][$this->_sections['doc']['index']]['ord']; ?>
">&nbsp;<a href="<?php echo $this->_tpl_vars['links'][$this->_sections['doc']['index']]['url']; ?>
" target="_blank"><?php echo $this->_tpl_vars['links'][$this->_sections['doc']['index']]['webname']; ?>
</a> 
	                </td>
	                <td><input type="hidden" name="ids[]" value="<?php echo $this->_tpl_vars['links'][$this->_sections['doc']['index']]['id']; ?>
">
	                <img height="30" src="<?php echo $this->_tpl_vars['public']; ?>
/uploads/logos/<?php echo $this->_tpl_vars['links'][$this->_sections['doc']['index']]['logo']; ?>
"></td>
	                <td><?php echo $this->_tpl_vars['links'][$this->_sections['doc']['index']]['rname']; ?>
</td>
	                <td><?php echo ((is_array($_tmp=$this->_tpl_vars['links'][$this->_sections['doc']['index']]['dtime'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d") : smarty_modifier_date_format($_tmp, "%Y-%m-%d")); ?>
</td>
	                <td>
	                【<a href="<?php echo $this->_tpl_vars['url']; ?>
/mod/id/<?php echo $this->_tpl_vars['links'][$this->_sections['doc']['index']]['id']; ?>
">修改</a>】
					【<a onclick="return confirm('确定要删除友情链接<?php echo $this->_tpl_vars['links'][$this->_sections['doc']['index']]['webname']; ?>
吗？')" href="<?php echo $this->_tpl_vars['url']; ?>
/del/id/<?php echo $this->_tpl_vars['links'][$this->_sections['doc']['index']]['id']; ?>
">删除</a>】</td>
	            </tr>
	            <?php endfor; else: ?>
				<li class="list-group-item">
					暂无友情链接！
				</li>
			    <?php endif; ?>
	      
	        </tbody>
	      </table>
			<li class="list-group-item">
				<a  style='<?php if ($_GET['display'] == 'off'): ?>background:#888;color:white<?php endif; ?>'  href="<?php echo $this->_tpl_vars['url']; ?>
/index/display/off">不显示</a>&nbsp;|
				<a  style='<?php if ($_GET['display'] == 'on'): ?>background:#888;color:white<?php endif; ?>' href="<?php echo $this->_tpl_vars['url']; ?>
/index/display/on">显示</a>
				<button type="submit" class="btn btn-primary" name="order" >改变显示顺序</button>
			</li>
		</ul>	
    </form>
</div>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "public/footer.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
